
using CStock;
using System;
using System.Diagnostics;
using NUnit.Framework;
using System.Collections;
using CGraph;
using System.Data;
using System.Reflection;
namespace TestCases.UI.Chart
{
	

	/// <summary>Some simple Tests.</summary>
	/// 
	[TestFixture] 
	public class LinePlot
	{
		
		ArrayList yAxisArray ;
		ArrayList xAxisArray ;

		private void CreateDataArray(int numberOfItems)
		{
			// calculate 10 day moving average and 2*sd line
			
			yAxisArray = new ArrayList();
			xAxisArray = new ArrayList();

			DateTime dt = DateTime.Now;
			for (int i=0; i< numberOfItems; ++i)
			{
				double d = i;
				yAxisArray.Add( i);
				dt = dt.AddDays(1);
				
				xAxisArray.Add( dt);
			}

		}
		[SetUp] 
		public void Init() 
		{
			
			
		}
		private void LinePlotDraw(int nCount)
		{
			//create data
			CreateDataArray(nCount);
			//Chart window

			ChartWindow cw = new ChartWindow();
			object o = cw.Charts[0];	
			ChartControl  c = o as ChartControl ;
            ChartControlsHelper.Test_LinePlot(c, this.xAxisArray, this.yAxisArray);

			cw.ShowDialog();
		}
		[Test] 
		public void LinePlot_100()
		{
			LinePlotDraw(100);
			
		}
		[Test] 
		public void LinePlot_1000()
		{
			LinePlotDraw(1000);
		}
	
	}
	
}